Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MapBox VectorTile: bug fixes using an official MapBox stream #2469

Merged
merged 19 commits into from
Jan 15, 2025

Conversation

ftoromanoff
Copy link
Contributor

@ftoromanoff ftoromanoff commented Nov 26, 2024

Using the mapbox style file "mapbox://styles/mapbox/streets-v8" on mapLib and on itowns, I noticed the result as not at all comparable.
image
image

Thus I looked layers by layers to understand what were we doing wrong in itowns and tried to correct a maximum of bugs. The example using the mapbox stream has been added. (examples/vector_tile_2d_mapbox.html)

What this PR does:

  • new feature:
    • support relative urls in style file (ArcGIS style file)
    • add a warn properties in source to add warnings and send them only ones
  • itowns bug fix:
    • Mapbox stream
      • enter url in {z}/{y}/{x} instead of ${z}/${y}/${x}
      • wrong selection of metadata when "{id}" in sprite
      • gestion of MVT layer using the 'ref' properties
      • gestion of line and polygon Label (simplified -> we use the first point of the geometry and sending a warning)
      • good gestion of the layer.order properties
    • Style
      • take into account the zoom in style when displaying layer
      • no display of polygon when fill.color is undefined
      • no display of line when stroke.width is 0
      • no recoloring of icon when icon.color is white (to avoid a lightning of the icon)
      • allow multiple label with same text (for contour lines)
      • no display of icon if size is 0

@ftoromanoff ftoromanoff force-pushed the mapBoxVT branch 2 times, most recently from 5581f1e to 9fcfdee Compare November 26, 2024 16:57
@ftoromanoff ftoromanoff marked this pull request as ready for review November 27, 2024 08:48
@ftoromanoff ftoromanoff changed the title MapBox VectorTile: bug fixes using an official MapBox flux MapBox VectorTile: bug fixes using an official MapBox stream Nov 27, 2024
@ftoromanoff ftoromanoff requested a review from jailln November 27, 2024 10:01
@ftoromanoff ftoromanoff force-pushed the mapBoxVT branch 2 times, most recently from bc8515d to 18b1d2c Compare November 27, 2024 14:18
Copy link
Contributor

@jailln jailln left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the debug and the fixes :)

examples/vector_tile_raster_2d_mapbox.html Outdated Show resolved Hide resolved
examples/vector_tile_raster_2d_mapbox.html Outdated Show resolved Hide resolved
examples/vector_tile_raster_2d_mapbox.html Outdated Show resolved Hide resolved
examples/vector_tile_raster_2d_mapbox.html Outdated Show resolved Hide resolved
src/Source/Source.js Outdated Show resolved Hide resolved
src/Core/Style.js Show resolved Hide resolved
src/Core/Style.js Show resolved Hide resolved
src/Renderer/Label2DRenderer.js Show resolved Hide resolved
src/Parser/VectorTileParser.js Outdated Show resolved Hide resolved
src/Core/Style.js Show resolved Hide resolved
@ftoromanoff ftoromanoff force-pushed the mapBoxVT branch 3 times, most recently from b822a6b to 5af1a3d Compare January 7, 2025 09:45
Copy link
Contributor

@jailln jailln left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ready to merge! Thanks @ftoromanoff

@ftoromanoff ftoromanoff merged commit 858b89e into iTowns:master Jan 15, 2025
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants